package com.yt.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname ConfigController
 * @Description
 * @Date 2021/10/23 8:15
 * @Create by 杨涛
 */
@RestController
@RefreshScope
public class ConfigController {


    @Value("${name}")
    private String name;

    @RequestMapping("/getname")
    public String getname(){
        return name;
    }
}
